$(document).ready(function () { jQuery('header nav').meanmenu(); }); $(document).ready(function () { $("#enquiry_type").change(function(){ var enq_type = $(this).val(); if(enq_type == 1){ // window.location.href = "complaint"; window.location.href = 'https://crm.Shinetech electric.com/getCustomerInfo.jsp'; }else if(enq_type == 2){ window.location.href = "dealers"; }else if(enq_type == 3){ window.location.href = "franchisee"; }else if(enq_type == 4){ window.location.href = "trade"; }else if(enq_type == 5){ window.location.href = "sales"; }else if(enq_type == 6){ window.location.href = "modern_trade"; }else if(enq_type == 7){ window.location.href = "media"; }else if(enq_type == 8){ window.location.href = "feedback"; } }); $("#cb_state").change(function(){ var state_id = $(this).val(); $.ajax({ type: "POST", url: "get/city", data: 'id=' + state_id, success: function(data) { $("#cb_city").html(data); $("#cb_city").trigger('chosen:updated'); }, error: function(error, errortype, errorstatus) { alert(errortype); } }); }); $("#btn1").mouseover(function () { $("#vidArea1").css({ display: "block" }); $('.bgVid').play(); }); $("#btn1").mouseout(function () { $("#vidArea1").css({ display: "none" }); $('.bgVid').pause(); }); $("#btn2").mouseover(function () { $("#vidArea2").css({ display: "block" }); }); $("#btn2").mouseout(function () { $("#vidArea2").css({ display: "none" }); }); $("#btn3").mouseover(function () { $("#vidArea3").css({ display: "block" }); }); $("#btn3").mouseout(function () { $("#vidArea3").css({ display: "none" }); }); $("#btn4").mouseover(function () { $("#vidArea4").css({ display: "block" }); }); $("#btn4").mouseout(function () { $("#vidArea4").css({ display: "none" }); }); $("#sab").click(function () { $(".form").show(); }); $(document).click(function (e) { var container = $("#sab"); if (!container.is(e.target) && container.has(e.target).length === 0) { $(".form").hide(); } }); $(".buttonPanel .readmore").click(function () { $(".buttonPanel .readmore span").text(function (i, text) { return text === "Read More" ? "Read Less" : "Read More"; }) $(".buttonPanel .readmore").toggleClass("open"); $(".hide").slideToggle("open"); }); $('.calc-saving a.action').click(function () { $('.calc-saving').addClass('close'); }); $('.calc-saving .open').click(function () { $('.calc-saving').removeClass('close'); }); }); if (screen.width < 768) { $('.calc-saving').addClass('close'); } if (screen.width < 1280) { $(document).ready(function () { $('a.career').click(function () { $('ul.career-menu').slideToggle(); }); }); } function trendingSlider() { $("whatsTradingCol").ready(function () { $('.trendingSlider').bxSlider({ auto: true, minSlides: 1, maxSlides: 1, slideWidth: 170, hideControlOnEnd: true, moveSlides: 1 }); }); } function blogSlider() { $("blogPostContainer").ready(function () { $('.blogSlider').bxSlider({ auto: false, controls: true, minSlides: 1, maxSlides: 1, slideWidth: 170, hideControlOnEnd: true, moveSlides: 1 }); }); } function videoSlider() { $(document).ready(function () { $('.videoslider').bxSlider({ auto: false, controls: true, pager: false, moveSlides: 1 }); }); } function awardSlider() { $("socialPanel").ready(function () { $('.awardSlider').bxSlider({ auto: true, minSlides: 1, maxSlides: 1, slideWidth: 170, hideControlOnEnd: true, moveSlides: 1 }); }); } function socialTab() { $("socialTab").ready(function () { $(".socialTabHead ul li").click(function () { $(".socialTabHead ul li").removeClass("active"); $(this).addClass("active"); var indexval = $(this).index(); $(".socialTabBody ul li").removeClass("active"); $(".socialTabBody ul li").eq(indexval).addClass("active"); }); }); } function mapTabbing() { $("mapPanel").ready(function () { $(".mabTabHead > ul > li").click(function () { $(".mabTabHead > ul > li").removeClass("active"); $(this).addClass("active"); var indexval = $(this).index(); $(".mapTabBody > ul > li").removeClass("active"); $(".mapTabBody > ul > li").eq(indexval).addClass("active"); }); }); } function aboutSlide() { $(".aboutSlider").ready(function () { var aboutslider = $('#aboutSlider').bxSlider({ mode: 'horizontal', auto: false, minSlides: 1, maxSlides: 1, moveSlides: 1, startSlide: 11, pagerCustom: '#aboutPager', pause: 10000, speed: 500, nextSelector: "#nextBtn", prevSelector: "#prevBtn", adaptiveHeight: true, onSlideBefore: function () { var currentslide = aboutslider.getCurrentSlide(); } }); }); $('#aboutPager a:nth-child(2n+2)').addClass("odd"); $('#aboutPager a:nth-child(2n+1)').addClass("even"); } function contactmap() { var myCenter = new google.maps.LatLng(28.5492957, 77.2656253); function initialize() { var mapProp = { center: myCenter, zoom: 17, disableDefaultUI: true, scrollwheel: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("googleMap"), mapProp); var marker = new google.maps.Marker({ position: myCenter, }); marker.setMap(map); infowindow.open(map, marker); } google.maps.event.addDomListener(window, 'load', initialize); } function presenceTab() { $("presencePanel").ready(function () { $(".presenceTabHead > ul > li").click(function () { $(".presenceTabHead > ul > li").removeClass("active"); $(this).addClass("active"); var indexval = $(this).index(); $(".presenceTabBody > ul > li").removeClass("active"); $(".presenceTabBody > ul > li").eq(indexval).addClass("active"); }); }); } function bg_header() { $(window).scroll(function () { var scroll = $(window).scrollTop(); if (scroll >= 50) { $(".homeHeader").addClass("bg"); } else { $(".homeHeader").removeClass("bg"); } }); } function eventSlider1() { $("#tabContainer").ready(function () { $('#eventSlide1').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); $('#eventSlide2').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); $('#eventSlide3').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); $('#eventSlide4').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 1000, speed: 1000 }); $('#eventSlide5').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); $('#eventSlide6').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); $('#eventSlide7').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); $('#eventSlide8').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); $('#eventSlide9').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); $('#eventSlide10').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); $('#eventSlide11').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); $('#eventSlide12').bxSlider({ mode: 'horizontal', auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: true, controls: false, pause: 4000, speed: 1000 }); }); } function readmore() { $('.acc-cont').hide(); $('.btn1').click(function () { if (!$(this).hasClass('active')) { $(this).addClass('active').next().slideDown(); } else $(this).removeClass('active').next().slideUp(); }); } function accordin() { $('.acc-cont').hide(); $('.acc-trgr').click(function () { if (!$(this).hasClass('active')) { $(this).addClass('active').next().slideDown(); } else $(this).removeClass('active').next().slideUp(); }); } function sliderRM() { $(".aboutSection hgroup h6 span").hide(); $("p.rcont").hide(); $('.rm1').click(function () { $(".aboutSection hgroup h6 span").slideToggle(); $(".rm1").toggleClass('active'); $(this).text(function (i, text) { return text === "Read More..." ? "Read Less..." : "Read More..."; }) }); } $("#pagesNewsletterForm").submit(function (event) { var emailvalid = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; var msg = true; var txtnewsemail = $('#txtnewsemail').val(); var form = $("#pagesNewsletterForm").serialize(); if (txtnewsemail.trim() == '') { $('#emailiderror').html('Please enter email address'); msg = false; } else if (!emailvalid.test(txtnewsemail)) { $('#emailiderror').html('Please enter valid email address'); msg = false; } else { $('#emailiderror').html('nameerror'); } event.preventDefault(); }); function detailCol() { $(".tabContentDetail").hide(); $(".tabNavDetail li:first").addClass("active").show(); $(".tabContentDetail:first").show(); $(".tabNavDetail li").click(function () { $(".tabNavDetail li").removeClass("active"); $(this).addClass("active"); $(".tabContentDetail").hide(); var activeTab = $(this).find("a").attr("href"); $(activeTab).fadeIn(); return false; }); } function detailSlider() { $('#carousel').flexslider({ animation: "fade", controlNav: false, animationLoop: false, slideshow: false, asNavFor: '#slider', direction: "vertical", prevText: "#prevbtn", nextText: "#nextbtn", itemWidth: 72 }); $('#slider').flexslider({ animation: "slide", controlNav: "thumbnails", directionNav:false, animationLoop: false, slideshow: false }); } function eventSlider() { $('#carouselbox').flexslider({ animation: "slide", controlNav: false, animationLoop: false, directionNav: false, slideshow: false, asNavFor: '#sliderbox', itemWidth: 150 }); $('#sliderbox').flexslider({ animation: "slide", controlNav: false, directionNav: true, animationLoop: false, slideshow: false, sync: "#carousel" }); } function prosliderOne() { $('.prosliderInner').bxSlider({ auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, pager: false, nextSelector: "#nextbtn", prevSelector: "#prevbtn", infiniteLoop: true, hideControlOnEnd: true }); } function dragable() { var element = document.getElementById('draggableElement'), x = 0, y = 0; interact(element).draggable({ snap: { targets: [interact.createSnapGrid({ x: 30, y: 30 })], range: Infinity, relativePoints: [{ x: 0, y: 0 }] }, inertia: true, restrict: { restriction: element.parentNode, elementRect: { top: 0, left: 0, bottom: 1, right: 1 }, endOnly: true } }).on('dragmove', function (event) { x += event.dx; y += event.dy; event.target.style.webkitTransform = event.target.style.transform = 'translate(' + x + 'px, ' + y + 'px)'; }); interact('#draggableElement').resizable({ preserveAspectRatio: true, edges: { left: true, right: true, bottom: true, top: true } }).on('resizemove', function (event) { var target = event.target, x = (parseFloat(target.getAttribute('data-x')) || 0), y = (parseFloat(target.getAttribute('data-y')) || 0); target.style.width = event.rect.width + 'px'; target.style.height = event.rect.height + 'px'; x += event.deltaRect.left; y += event.deltaRect.top; }); $(".proContent").hide(); $(".colorPallets li:first").addClass("active").show(); $(".proContent:first").show(); $(".colorPallets li").click(function () { $(".colorPallets li").removeClass("active"); $(this).addClass("active"); $(".proContent").hide(); var activeTab = $(this).find("a").attr("href"); $(activeTab).fadeIn(); return false; }); } $(document).ready(function () { $(".colorBox li").click(function () { $(".colorBox li").removeClass("active"); $(this).addClass("active"); }); $(".orgbtn").click(function () { $(".buttonRows").hide(); $(".scndPart").show(); }); $('.mean-container .mean-nav > ul ul').hide(); $('.mean-container .mean-nav ul li a.toggle').click(function () { $(this).toggleClass('open').next().slideToggle(); }); $("#arrowP").click(function () { $("#arrowP").toggleClass("active"); $(".productListing ul li").slideToggle(); }); $(".btn360").colorbox(); }); function mappinglistID() { var myCenter = new google.maps.LatLng(28.5492957, 77.2656253); function initialize() { var mapProp = { center: myCenter, zoom: 17, disableDefaultUI: true, scrollwheel: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map"), mapProp); var marker = new google.maps.Marker({ position: myCenter, }); marker.setMap(map); infowindow.open(map, marker); } google.maps.event.addDomListener(window, 'load', initialize); }